import { Session } from "@/utils";
import { defineStore } from "pinia";
import { reactive } from "vue";
import type {TagsViewRoutesState} from './types/index'

export const useTagsViewRoutes = defineStore('tagsViewRoutes', ()=>{
    const state = reactive<TagsViewRoutesState>({
        tagsViewRoutes: [],
		isTagsViewCurrenFull: false,
    })
    async function setTagsViewRoutes(data: Array<string>) {
        state.tagsViewRoutes = data;
    }
    function setCurrenFullscreen(bool: Boolean) {
        Session.set('isTagsViewCurrenFull', bool);
        state.isTagsViewCurrenFull = bool;
    }
    return {
        state,
        setTagsViewRoutes,
        setCurrenFullscreen
    }
})